package cn.gbase.jiangsu.data.transfer.bean;

import java.util.Date;

import org.nutz.dao.entity.annotation.Column;
import org.nutz.dao.entity.annotation.Id;
import org.nutz.dao.entity.annotation.Table;

import cn.gbase.jiangsu.data.transfer.validation.annotation.Validations;

/**
 * 社区的楼.
 * 
 */
@Table("community_building")
public class CommunityBuilding extends BaseDto {

	/**
	 * ID.
	 */
	@Column
	@Id
	private int id;

	/**
	 * 楼号.
	 */
	@Column("building_no")
	@Validations(required = true, strLen = { 1, 4 }, errorMsg = "楼号应为1-4个字符。")
	private String buildingNo;

	/**
	 * 楼编码.
	 */
	@Column("building_code")
	@Validations(required = false, strLen = { 0, 4 }, errorMsg = "楼编码应为1-4个字符。")
	private String buildingCode;

	/**
	 * 所属小区.
	 */
	@Column("community_id")
	@Validations(required = true, limit = { 1 }, errorMsg = "请选择所属小区。")
	private int communityId;

	/**
	 * 楼层数.
	 */
	@Column("floor_number")
	@Validations(required = false, limit = { 1, 100}, errorMsg = "楼层数应为1-100之间的数字。")
	private int floorNumber;
	
	/**
	 * 单元数.
	 */
	@Column("unit_number")
	@Validations(required = false, limit = { 1, 100}, errorMsg = "单元数应为1-100之间的数字。")
	private int unitNumber;

	/**
	 * 删除
	 */
	@Column("delete_flag")
	private int deleteFlag;
	
	public int getDeleteFlag() {
		return deleteFlag;
	}

	public void setDeleteFlag(int deleteFlag) {
		this.deleteFlag = deleteFlag;
	}

	/**
	 * 所在位置.
	 */
	@Column("position")
	@Validations(required = false, strLen = { 0, 30 }, errorMsg = "所在位置应为1-30个字符。")
	private String position;

	/**
	 * 备注.
	 */
	@Column
	private String remark;

	/**
	 * 创建时间.
	 */
	@Column("create_date")
	private Date addtime;

	/**
	 * 创建人.
	 */
	@Column("create_user")
	private String createUser;

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getBuildingNo() {
		return buildingNo;
	}

	public void setBuildingNo(String buildingNo) {
		this.buildingNo = buildingNo;
	}

	public String getBuildingCode() {
		return buildingCode;
	}

	public void setBuildingCode(String buildingCode) {
		this.buildingCode = buildingCode;
	}

	public int getCommunityId() {
		return communityId;
	}

	public void setCommunityId(int communityId) {
		this.communityId = communityId;
	}

	public int getFloorNumber() {
		return floorNumber;
	}

	public void setFloorNumber(int floorNumber) {
		this.floorNumber = floorNumber;
	}

	public int getUnitNumber() {
		return unitNumber;
	}

	public void setUnitNumber(int unitNumber) {
		this.unitNumber = unitNumber;
	}

	public String getPosition() {
		return position;
	}

	public void setPosition(String position) {
		this.position = position;
	}

	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	public Date getAddtime() {
		return addtime;
	}

	public void setAddtime(Date addtime) {
		this.addtime = addtime;
	}

	public String getCreateUser() {
		return createUser;
	}

	public void setCreateUser(String createUser) {
		this.createUser = createUser;
	}

}
